PtrToXHand
PtrToXHand
Copy data into an existing Handle's data area #include <OSUtils.h> Operating System Utilities
Ptr srcPtr ; address of some data to copy Handle destHandle ; existing Handle to receive the data long size ; length, in bytes, of data to copy
PtrToXHand destroys the existing contents of a Handle's data area and copies data into that block.
srcPtr is the address of some data.
destHandle is the address of a 4-byte Handle. Upon return, its data area will
contain a copy of the data starting at srcPtr.
size is the size, in bytes, of the data you wish to copy.
memFullErr (-108) Not enough room in heap
nilHandleErr (-109) destHandle was invalid on entry
memWZErr (-111) Attempt to operate on a free block
Notes: PtrToXHand copies data of any type or size into the data area of an existing (already- allocated) Handle. If you wish to create a new Handle, use